import java.util.Scanner;

public class Main {
    public static double func(int n){
        int flag=1;
        if(n==1) return 0.5;
        flag=-1;
        return func(n-1)+1.0/(n*(n+1))*flag;
    }
    /*public static int func(int n){
        if(n==2) return 4;
        return func(n-1)+(n-1)*(n-1)*n*n;
    }*/
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        double ret=func(n);
        System.out.printf("%.6f",ret);
    }
}
